package com.dhcc.provider.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import com.dhcc.api.entity.User;
import com.dhcc.api.service.IUserService;
import com.dhcc.provider.mapper.UserMapper;

@DubboService
public class UserServiceImpl implements IUserService {
	
	@Autowired
	private UserMapper userMapper;

	@Override
	public User selectUserById(Long id) {
		System.out.println("生产者生产...");
		try {
			// 睡眠5s
			Thread.sleep(3000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		User userById = userMapper.selectUserById(id);
		return userById;
	}

}
